﻿@model IRIS.Models.SearchViewModel

@{
    ViewBag.Title = "IRIS Ættleiðingartengd fræðsla : Leit";
}
<h3>Greinar</h3>
<ul>
    @{
        //If there are no items in the Model we display a nice not found message 
        if(Model.m_Articles.Count() != 0)
        {
            foreach (var item in Model.m_Articles)
            {
                <li>@Html.ActionLink(item.ContentTitle, "Details", "Content", new { id = item.ID }, null)</li>
            }
        }
        else
        {
            <li>Engar greinar fundust með þennan streng</li>
        }
    }
</ul>
<h3>Atburðir</h3>
<ul>
    @{ 
        if (Model.m_Events.Count() != 0)
        {
            foreach (var item in Model.m_Events)
            {
                <li>@Html.ActionLink(item.Title, "Details", "Events", new { id = item.ID }, null)</li> 
            }
        }
        else
        {
            <li>Engir atburðir fundust með þennan streng</li>
        }
    }
</ul>
<h3>Fréttir</h3>
<ul>
    @{ 
        if (Model.m_News.Count() != 0)
        {
            foreach (var item in Model.m_News)
            {
                <li>@Html.ActionLink(item.ContentTitle, "Details", "Content", new { id = item.ID }, null)</li> 
            }
        }
        else
        {
            <li>Engar fréttir fundust með þennan streng</li>
        }
    }
</ul>
</table>
